#!/usr/bin/python3
# -*- coding:utf-8 -*-
# Copyright 2022-2023 Huawei Technologies Co., Ltd
import numpy as np
import os
import tensorflow as tf

def gen_golden_data_simple():
    input_x = np.random.uniform(-1000, 1000, [64, 64]).astype(np.float32)
    input_axis = np.array([0,1]).astype(np.int32)
    keepdims = True
    golden = tf.reduce_sum(input_x, axis=input_axis, keepdims=keepdims).numpy().astype(np.float32)
    os.system("mkdir -p input")
    os.system("mkdir -p output")
    print(golden)
    input_x.tofile("./input/input_x.bin")
    input_axis.tofile("./input/input_axis.bin")
    golden.tofile("./output/golden.bin")


if __name__ == "__main__":
    gen_golden_data_simple()
